<!--
   @file
   sample-simpleredirect.html

   Simple A/B Test library. Test SimpleRedirect.

   LICENSE

   This source file is subject to the new BSD license that is bundled
   with this package in the file LICENSE.txt.
   It is also available through the world-wide-web at this URL:
   http://code.google.com/p/abtest-js/wiki/License
   If you did not receive a copy of the license and are unable to
   obtain it through the world-wide-web, please send an email
   to aldo.armiento@gmail.com so we can send you a copy immediately.

   @see http://code.google.com/p/abtest-js/
   @author (C) 2010 Aldo Armiento (aldo.armiento@gmail.com)
   @author Sponsored by Gruppo Immobiliare.it S.r.l. (http://www.immobiliare.it/)
   @version $Id$
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<title>AB Test</title>
	<script type="text/javascript" charset="utf-8" src="js/ABTest.js"></script>
	<script type="text/javascript" charset="utf-8" src="js/ABTest/SimpleRedirect.js"></script>
	<script type="text/javascript" charset="utf-8">
		if (typeof ABTest == 'object') {
			ABTest.enableLog(true);
			ABTest.start('v5-beta', {
				probability: 50, domain: '.example.com',
				test: {
					name: 'SimpleRedirect',
					siteLucky: 'www.google.com', siteUnlucky: 'www.bing.com'
					// hostPart: 1, siteLucky: 'google', siteUnlucky: 'bing'
					// More seriously:
					// hostPart: 0, siteLucky: 'beta', siteUnlucky: 'www'
				}
			});
		}
	</script>
</head>
<body>
	<div id="adv">
		<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
			tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
			veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex
			ea commodo consequat. Duis aute irure dolor in reprehenderit in
			voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur
			sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt
			mollit anim id est laborum.</p>
	</div>
</body>
<script type="text/javascript">
	var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
	document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
	try {
		var pageTracker = _gat._getTracker("UA-xxxxxx-x");
		if(typeof ABTest == 'object') {
			//After a redirect, some browser lost the referrer, SimpleRedirect safely store it in the ABTest._referrer property:
			//WARNING: for an undocumented bug the call to _setReferrerOverride must be before _setCustomVar
			if(typeof ABTest._referrer != 'undefined') {
				pageTracker._setReferrerOverride(ABTest._referrer);
			}
			pageTracker._setCustomVar(1, 'ABTest', ABTest.isUserLucky() ? 'v5' : 'v4', 1);
		}
		pageTracker._trackPageview();
	} catch(err) {}
</script>
</html>